package test;

import org.hibernate.Session;
import org.hibernate.Transaction;

import com.luojun.entity.Commodity;
import com.luojun.entity.User;
import com.luojun.service.UCommodityService;
import com.luojun.util.HibernateUtil;
import com.pzc.entity.PersonManage;
import com.pzc.service.PersonManageService;


public class test2 {
	public static void main(String[] args){
		save();
		
	}
	
	public static void save() {
	  UCommodityService ucs = new UCommodityService();
	  Commodity  commodity = new Commodity();
	  User user = new User();
	  user.setUserId(3);
	  commodity.setDescribe("testProduct");
	  commodity.setName("testProduct");
	  commodity.setPicture("/static/img/1512242644709.jpg");
	  commodity.setPrice(100);
	  commodity.setUser(user);
	  for(int i = 0 ;i<=50;i++){
		  ucs.save(commodity);
	  }
	 
	}
}
